import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Queue;

public class queue_l {
    public static void main(String[] args) {
Queue<Integer> q = new LinkedList<>();
        Deque<Integer> d1 = new ArrayDeque<>();
        Deque<Integer> d2 = new LinkedList<>();
q.offer(1);
q.offer(2);
q.offer(3);
q.offer(4);
q.offer(5);
System.out.println(q.size());
System.out.println(q.peek());

q.poll();
System.out.println(q.poll()); // 从队头出队列，并将删除的元素返回

if(q.isEmpty()){
System.out.println("队列空");
}else{
System.out.println(q.size());
}
    }
}
